<template>
  <div class="header-inner d-flex align-items-start flex-column">
    <ul class="vertical-menu scrollspy" v-html="articleToc"/>

  </div>

</template>


<script>

import {setArticleMenuStyle} from "../../../public/static/js/article-menu";


export default {
  data() {
    return {
      articleToc: '',
    }
  },

  name: "article_menu",

  mounted() {
    this.getMenu();
  },

  methods: {
    getMenu() {
      this.$get(this.$reurl + 'article_content?articleId=' + this.$route.query.articleId).then(res => {
        if (res.res_status === 200) {
          this.articleToc = res.article_toc
          this.$nextTick(() => {
            setArticleMenuStyle()
          })
        } else {
          console.error(res.msg)
        }
      })
    }
  }
}
</script>

<style scoped>

.header-inner {
  padding: 30px 30px 30px 0 !important;
}


</style>